<?php 
     
     $title         =$this->formText('title',$this->arrParam['title'],array('class'=>'txttextbox'));
     $type 	        =$this->formRadio('type',1,array('class'=>'loai'),array('1'=>'Home','2'=>'Article','5'=>'List Article','3'=>'Product','6'=>'Details Product','7'=>'Solution','4'=>'Contact'), ' ');
     $published 	=$this->formRadio('published',1,null,array('0'=>'No','1'=>'Yes'), ' ');
     $order         =$this->formText('order',NULL,array('class'=>'txttextbox'));
     $position 	    =$this->formRadio('position',1,null,array('1'=>'Top','2'=>'Center','3'=>'Footer'), ' ');
     
    
     $product       =$this->data;
     $product['0']='List Product';
     ksort($product);
     $section        =$this->formSelect('category_product_id',null,array('class'=>'cbo_box'),$product,'');
     
     $result=$this->result;
    
     $result['0']='Article';
     ksort($result);
     $about        =$this->formSelect('category',null,array('class'=>'cbo_box'),$result,'');
     
     $list_cat      = $this->list_cat;
     $list_cat['0'] = "List Article";
     ksort($list_cat);
     $list_article  =$this->formSelect('list_cat',null,array('class'=>'cbo_box'),$list_cat,'');
     
     $detail_product= $this->details_product;
     $detail_product['0'] = "Details Product";
     ksort($detail_product);
     $product  =$this->formSelect('details_product',null,array('class'=>'cbo_box'),$detail_product,'');
     
     $language    =$this->language;
     $language['0']='Select Language';
     ksort($language);
     $select_language =$this->formSelect('language_id',null,array('class'=>'cbo_box'),$language,'');
     
     $solution_product= $this->solution;
     $solution_product['0'] = "Select solution";
     ksort($solution_product);
     $solution_product  =$this->formSelect('solution',null,array('class'=>'cbo_box'),$solution_product,'');
     

    
     
 ?>
<script type="text/javascript">
$(document).ready(function(){
        $(".loai").click(function() {
            	val = $(this).val();
            	if (val==3)
            	{
                  $('#category').removeClass('show_hide');
            	}
            	else
            	{
           		 $('#category').addClass('show_hide');
           		
                }
                
            	if (val==2)
            	{
                  $('#category_pro').removeClass('show_hide');
            	}
            	else
            	{
           		
           		 $('#category_pro').addClass('show_hide');
                }

            	if (val==5)
            	{
                  $('#list_category').removeClass('show_hide');
            	}
            	else
            	{
           		
           		 $('#list_category').addClass('show_hide');
                }

            	if (val==6)
            	{
                  $('#details_product').removeClass('show_hide');
            	}
            	else
            	{
           		
           		 $('#details_product').addClass('show_hide');
                }

            	if (val==7)
            	{
                  $('#solution_product').removeClass('show_hide');
            	}
            	else
            	{
           		
           		 $('#solution_product').addClass('show_hide');
                }
            });
});
</script>


<div>

<form name="appForm" method="post" action="" id="appForm">
<?php echo $this->render('/menu/include/toolbar.php');?>
  <?php 
     if ($this->error!='')
         {
           echo '<h2 class="error">'.$this->error.'</h2>'	;
         }
  ?>
  <table class="tbl_content" width="99%" cellspacing="0" cellpadding="4" border="0">
     <tr>
        <td class="left_lable">Title</td>
        <td class="right_lable"><?php echo $title;?></td>
     </tr>
     <tr>
        <td class="left_lable">Parent Menu</td>
        <td class="right_lable">
             <?php  echo $this->ParentItem($name='parents',$default='-Select Menu Parents -',$make="",$this->parent);?>
             
        </td>
     </tr>
     <tr>
        <td class="left_lable">Type Menu</td>
        <td class="right_lable">
            <?php echo $type; ?>
         </td>
     </tr>
    
      <tr id="category" class="show_hide">
        <td class="left_lable">List Product</td>
        <td id="menu_load" class="right_lable"> 
            <?php echo $section; ?>
        </td>
     </tr>
     
      <tr id="category_pro" class="show_hide">
        <td class="left_lable">Article</td>
        <td id="menu_load" class="right_lable"> 
            <?php echo $about; ?>
        </td>
     </tr>
     
      <tr id="list_category" class="show_hide">
        <td class="left_lable">List Article</td>
        <td id="menu_load" class="right_lable"> 
            <?php echo $list_article; ?>
        </td>
     </tr>
     
      <tr id="details_product" class="show_hide">
        <td class="left_lable">Detail Product</td>
        <td id="menu_load" class="right_lable"> 
            <?php echo $product; ?>
        </td>
     </tr>
     
      <tr id="solution_product" class="show_hide">
        <td class="left_lable">Solution</td>
        <td id="menu_load" class="right_lable"> 
            <?php echo $solution_product; ?>
        </td>
     </tr>
     
     <tr>
         <td class="left_lable">Language</td>
         <td class="right_lable"><?php echo $select_language; ?></td>
     </tr>
      <tr>
        <td class="left_lable">Introtext</td>
        <td class="right_lable">
         <textarea name=introtext id=introtext class=txttextbox /></textarea>
			<script type="text/javascript">
            var editor = CKEDITOR.replace( 'introtext',{
            uiColor : '#9AB8F3',
            language:'vi',
            skin:'kama',
            width:'98%',
            height:'300px',
            filebrowserImageBrowseUrl : '<?php echo JURI."/ckfinder/ckfinder.html?Type=Images";?>',
            filebrowserFlashBrowseUrl : '<?php echo JURI."/ckfinder/ckfinder.html?Type=Flash";?>',
			filebrowserImageUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
			filebrowserFlashUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
			 	
            toolbar:[
            ['Source','-','Save','NewPage','Preview','-','Templates'],
            ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'],
            ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
            ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
            ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
            ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
            ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
            ['Link','Unlink','Anchor'],
            ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
            ['Styles','Format','Font','FontSize'],
            ['TextColor','BGColor'],
            ['Maximize', 'ShowBlocks','-','About']
            ]
        });		
        </script>
       </td>
       
     </tr>
    <tr>
         <td class="left_lable">Position</td>
         <td class="right_lable"><?php echo $position; ?></td>
     </tr>
     <tr>
        <td class="left_lable">Publish</td>
        <td class="right_lable"><?php echo $published;?></td>
     </tr>  
     <tr>
        <td class="left_lable">Order</td>
        <td class="right_lable"><?php echo $order; ?></td>
      </tr>
      
  </table>
  <input type="hidden" name="key" id="id" value="add">

</form>
</div>